﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using anks.Core;
using anks.Components;
using anks.Lib.Logging;

namespace agg
{
    public static class Extensions
    {
        public static ServiceProvider Services(this ComponentContext context)
        {
            return AppSerivces.Instance;
        }

        public static Logging Log(this ComponentContext context)
        {
            return Services(context).logging;
        }

        public static Component GetImplementation(this ComponentContext context, string typeName)
        {
            return Services(context).componentRegistry.Implementation(typeName);
        }
    }
}
